Skip to content

Format DonateWidget balance, extract shared formatTokenAmount#799

Merged
realproject7 merged 1 commit intomainfrom
task/796-donate-format
Apr 3, 2026
Merged

Format DonateWidget balance, extract shared formatTokenAmount#799
realproject7 merged 1 commit intomainfrom
task/796-donate-format

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Extracts formatTokenAmount from TradingWidget.tsx to shared lib/format.ts
  • Applies formatting to DonateWidget.tsx balance display and donation amount
  • TradingWidget.tsx now imports from shared location (no behavior change)

Before/After

  • Balance: 5034.425044895956140455 PLOT5,034.43 PLOT
  • Donating: 68.623631443223832041 PLOT68.62 PLOT

Test Plan

  • DonateWidget: verify balance formatted correctly
  • DonateWidget: verify donation amount formatted correctly
  • TradingWidget: verify no regression (same formatting, shared import)

Fixes #796

🤖 Generated with Claude Code

Extract formatTokenAmount from TradingWidget to shared lib/format.ts.
Apply to DonateWidget balance and donation amount displays. Values
now show 2dp with commas for >= 1, 4dp for small, scientific for tiny.

Fixes #796

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 3, 2026 10:14am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The PR fixes the raw 18-decimal display in DonateWidget and reuses the existing TradingWidget formatting logic by moving it into a shared helper. The change is focused and matches issue #796.

Findings

  • No blocking findings.

Decision

Approving. The balance and donation summary now use shared token-amount formatting, which satisfies the issue's acceptance criteria.

@realproject7 realproject7 merged commit c747c1c into main Apr 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DonateWidget: unformatted balance shows raw 18-decimal values

2 participants